// ====================================================
// Add Main Popup Menu
// ====================================================
var strFileNo = '';

Ext.getCmp('id_grid_file_path').on('rowcontextmenu', function(grid, rowIdx, e){
	
	e.stopEvent();
	var coords = e.getXY();
	
	strFileNo = gstoreFilePath.getAt(rowIdx).get('file_no');
	
	new Ext.menu.Menu({
		id: 'grid_menu',
		items: [
		'<b class="menu-title">메뉴를 선택하세요.</b>',
        {
        	id: 'id_menu_log',
        	text: '원본 LOG 보기',
        	iconCls: 'icon-grid',
        	handler: fnMenuLogOpen
        },{
        	id: 'id_menu_file',
        	text: '실제 파일 보기',
        	iconCls: 'icon-grid',
        	handler: fnMenuFileOpen
        }]
	}).showAt([coords[0], coords[1]]);
});

function fnMenuLogOpen()
{
	var url = m_ContextName + '/analysis/analysis800Main.do?type=1&fileNo=' + strFileNo;
	var name = 'win_poput_log';
	var w = 800;
	var h = 1024;
	
	var strPos = "resizable=yes, scrollbars=yes, status=yes, width=" + w + ", height=" + h + ", left=0, top=0";
	var nw_win = window.open(url, name, strPos);
	nw_win.focus();
}

function fnMenuFileOpen()
{
	var url = m_ContextName + '/analysis/analysis800Main.do?type=2&fileNo=' + strFileNo;
	var name = 'win_poput_file';
	var w = 800;
	var h = 1024;
	
	var strPos = "resizable=yes, scrollbars=yes, status=yes, width=" + w + ", height=" + h + ", left=0, top=0";
	var nw_win = window.open(url, name, strPos);
	nw_win.focus();
}